﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnnealingModel.Demo.Common.Function
{
    [DisplayText(FunctionType.UnaryFunction4, "y=sin(πx)/πx")]
    internal class UnaryFunction4 : FuntionBase
    {
        public UnaryFunction4()
        {
            this.Range = (-10, 10);
            this.Solve = SolveType.Max;
            this.Accuracy = 3;
        }
        
        public override double Func(params double[] xs)
        {
            double x = xs[0];
            return Math.Sin(Math.PI * x) / (Math.PI * x);
        }
    }
}
